package edu.mit.compilers.assembly.x64.codes;

import edu.mit.compilers.assembly.x64.basic.X64Operand;

public class X64CompareCode extends X64Code {

    private final X64Operand s1;
    private final X64Operand s2;

    // actual s2 vs s1
    public X64CompareCode(X64Operand s1, X64Operand s2) {
        this.s1 = s1;
        this.s2 = s2;
    }

    @Override
    protected String getStringFroShow(String prefix, boolean debug) {
        return prefix + "cmpq" + TAB + s1.getAddress() + "," + TAB + s2.getAddress() + "\n";
    }
}
